import java.io.IOException;

import Interfaces.ICommandChannelListener;

public class Agent
{
	public static void main(String[] args) 
	{
		try 
		{
			/* Sending discovery msg */
			ManagmentChannel mc = new ManagmentChannel("225.4.5.6", 5000, 2000);
			mc.Start();
			
			/* Start listen to incoming commands */
			CommandHandler ch = new CommandHandler();
			ICommandChannelListener commandListener = new CommandChannelListener(6000, ch);
			commandListener.startListening();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
